const initState = {
	token: "",
	userData: [],
};
function reducer(state = initState, action) {
	switch (action.type) {
		case "SET_TOKEN":
			state.token = action.data;
			break;
		case "ADD_USER":
			state.userData.push(action.data);
			break;
		default:
			break;
	}
	console.log(JSON.parse(JSON.stringify(state)), "123");
	return JSON.parse(JSON.stringify(state));
}

export default reducer;
